<template>
    <div>
        <a-form
            :model="form"
            name="basic"
            :label-col="{ span: 8 }"
            :wrapper-col="{ span: 16 }"
            autocomplete="off"

        >
            <a-form-item
                label="姓名"
                name="username"
                :rules="[{ required: true, message: '输入姓名!' }]"
            >
                <a-input v-model:value="form.username" />
            </a-form-item>

            <a-form-item
                label="地址"
                name="address"
                :rules="[{ required: true, message: '输入密码!' }]"
            >
                <a-input v-model:value="form.address" />
            </a-form-item>


        </a-form>
    </div>

</template>

<script>
import ajax from '@/assets/js/ajax';
import BaseCustomForm from "@/assets/js/BaseCustomForm";
export default {
    name: "demoform",
    mixins: [BaseCustomForm],
    data() {
        return {
            form: {
                id: '',
                username: '',
                password: '',
            },
        }
    },
    created() {
        if(this.pk){
            let url = '/api-bpm/bpm/core/demo/get';
            ajax.get(url,{pkId:this.pk}).then(res=>{
                this.form = res.data;
            })
        }
    },
    methods: {
        getData() {
            return this.form;
        },
        valid(require,action){
            return {success:true,msg:""};
        }
    },
}
</script>
